﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FlickrDownloadr
{
    public static class Extensions
    {
        /// <summary>
        /// Manally performs a <seealso cref="System.Windows.Controls.Button.Click"/> event for a supplied
        /// <seealso cref="System.Windows.Controls.Button"/>.
        /// </summary>
        /// <param name="btnObject">The <seealso cref="System.Windows.Controls.Button"/> object to
        /// be clicked.</param>
        public static void PerformClick(this System.Windows.Controls.Button btnObject)
        {
            btnObject.RaiseEvent(
                new System.Windows.RoutedEventArgs(
                    System.Windows.Controls.Button.ClickEvent,
                    btnObject));
        }
    }
}